{layout name="layout" /}

<div class="row">
    <div class="col-md-12">
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title"><i class="fa fa-search"></i>搜索</h3>
                <div class="box-tools pull-right">
                    <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                </div>
            </div>
            <div class="box-body">
                <form class="form-horizontal" method="get" action="_ROOT_/admin/sysuser">
                    <div class="box-body">
                        <div class="form-group col-md-4">
                            <label for="username" class="col-sm-4 control-label">用户名：</label>
                            <div class="col-sm-8">
                                <input class="form-control" id="username" name="username" placeholder="用户名"
                                       value="{$Request.param.username}"/>
                            </div>
                        </div>
                        <div class="form-group col-md-4">
                            <label for="sex" class="col-sm-4 control-label">性别：</label>
                            <div class="col-sm-8">
                                <select id="sex" name="sex" class='form-control'>
                                    <option value="">请选择</option>
                                    <option value="0" {$Request.param.sex === 0 ? 'selected' : ''}>男</option>
                                    <option value="1" {$Request.param.sex === 1 ? 'selected' : ''}>女</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-md-4">
                            <label for="status" class="col-sm-4 control-label">状态：</label>
                            <div class="col-sm-8">
                                <select id="status" name="status" class='form-control'>
                                    <option value="">请选择</option>
                                    <option value="1" {$Request.param.status === 1 ? 'selected' : ''}>启用</option>
                                    <option value="0" {$Request.param.status === 0 ? 'selected' : ''}>禁用</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-md-12">
                            <div class="col-sm-2 pull-right">
                                <button type="submit" class="btn btn-primary btn-block">查询</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title">
                    <a href="_ROOT_/admin/sysuser/create" type="button" class="btn btn-primary">
                        添加用户<i class="fa fa-plus" style="margin-left:3px;"></i>
                    </a>
                </h3>
            </div>
            <div class="box-body table-responsive no-padding">
                <table class="table table-bordered table-striped">
                    <colgroup>
                        <col width="10%"/>
                        <col width="15%"/>
                        <col width="10%"/>
                        <col width="15%"/>
                        <col width="10%"/>
                        <col width="20%"/>
                        <col width="20%"/>
                    </colgroup>
                    <thead>
                    <tr>
                        <th>姓名</th>
                        <th>用户名</th>
                        <th>性别</th>
                        <th>注册时间</th>
                        <th>状态</th>
                        <th>备注</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="list" id="user"}
                    <tr>
                        <td><a href="_ROOT_/admin/sysuser/detail/{$user.id}" class="primary-link">{$user.name}</a></td>
                        <td>{$user.username}</td>
                        <td>{$user.sex}</td>
                        <td>{$user.create_time}</td>
                        <td>{$user.status}</td>
                        <td>{$user.remark}</td>
                        <td>
                            <a href="_ROOT_/admin/sysuser/edit/{$user.id}" class='btn btn-primary'>
                                编辑<i class="fa fa-edit"></i>
                            </a>
                            <a href="_ROOT_/admin/sysuser/delete/{$user.id}"
                               msg='您确定要删除{$user.username}用户吗?'
                               class='btn btn-danger del-item-normal'>删除<i class="fa fa-times"></i>
                            </a>
                            <a href="_ROOT_/admin/sysuser/resetpwd/{$user.id}"
                               class='btn btn-warning'>重置密码<i class="fa fa-repeat"></i>
                            </a>
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
            <div class="box-footer clearfix">
                <span class="dataTables_info">共<label>{$total}</label>条记录</span>
                {$page}
            </div>
        </div>
    </div>
</div>